#include "Ghostpot.h"
#include <iostream>
using namespace std;

Ghostpot::Ghostpot(GLdouble x, GLdouble z, GLdouble h) : Teapot(x, z, h)
{
}

Ghostpot::~Ghostpot()
{
}

void Ghostpot::setX(GLdouble x)
{
	xPos = x;
}

void Ghostpot::setZ(GLdouble z)
{
	zPos = z;
}

void Ghostpot::setHeading(GLdouble h)
{
	heading = h;
}

void Ghostpot::drawGhost()
{
	if (ghostPlay.size() > 0)
	{
		// Set X from deque, then pop
		setX(ghostPlay.at(0));
		ghostPlay.pop_front();
		
		// Set Z from deque, then pop
		setZ(ghostPlay.at(0));
		ghostPlay.pop_front();
		
		// Set Heading from deque, then pop
		setHeading(ghostPlay.at(0));
		ghostPlay.pop_front();
		
		// Use Teapot's draw function
		draw();
	}
}

void Ghostpot::addData(GLdouble data)
{
	ghostPlay.push_back(data);
}

void Ghostpot::clearData()
{
	ghostPlay.clear();
}
